package org.annotation.t.autowire;

import org.annotation.t.autowire.config.Configuration;
import org.annotation.t.autowire.controller.UserController;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
/**
 * 全注解开发，配置类使用了这两个注解：@Configuration @ScanComponent
 * */
public class Autowired_Config_annoRun {
    public static void main(String[] args) {
//        加载配置类
        ApplicationContext context = new AnnotationConfigApplicationContext(Configuration.class);
        UserController userController = context.getBean(UserController.class);
        userController.userController();
    }
}
